home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Hyper / A-An / *HyCard.XCMD.cpt / *HyCard.XCMD / CFlash.c next >
MacBinary  |  1987-08-06  |  2.3 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: CFlash.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Thu Aug 6 12:14:00 1987, modified Thu Aug 6 12:14:00 1987, creator 'MPS ', type ASCII, 1704 bytes "CFlash.c" , at 0x728 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 43 46 6c 61 73 68 | 2e 63 00 00 00 00 00 00 |..CFlash|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 06 a8 00 | 00 01 7e 9d 3e 5b c8 9d |........|..~.>[..|
|00000060| 3e 5b c8 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |>[......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 7c 67 00 00 |........|....|g..|
|00000080| 2f 2a 0d 09 43 46 6c 61 | 73 68 20 2d 2d 20 61 20 |/*..CFla|sh -- a |
|00000090| 73 61 6d 70 6c 65 20 48 | 79 70 65 72 43 61 72 64 |sample H|yperCard|
|000000a0| 20 75 73 65 72 2d 64 65 | 66 69 6e 65 64 20 63 6f | user-de|fined co|
|000000b0| 6d 6d 61 6e 64 20 69 6e | 20 43 2e 0d 09 a9 41 70 |mmand in| C....Ap|
|000000c0| 70 6c 65 20 43 6f 6d 70 | 75 74 65 72 2c 20 49 6e |ple Comp|uter, In|
|000000d0| 63 2e 20 31 39 38 37 0d | 09 41 6c 6c 20 52 69 67 |c. 1987.|.All Rig|
|000000e0| 68 74 73 20 52 65 73 65 | 72 76 65 64 2e 0d 0d 09 |hts Rese|rved....|
|000000f0| 54 6f 20 63 6f 6d 70 69 | 6c 65 20 61 6e 64 20 6c |To compi|le and l|
|00000100| 69 6e 6b 20 74 68 69 73 | 20 66 69 6c 65 20 75 73 |ink this| file us|
|00000110| 69 6e 67 20 4d 61 63 69 | 6e 74 6f 73 68 20 50 72 |ing Maci|ntosh Pr|
|00000120| 6f 67 72 61 6d 6d 65 72 | 27 73 20 57 6f 72 6b 73 |ogrammer|'s Works|
|00000130| 68 6f 70 2c 0d 0d 09 43 | 20 2d 71 32 20 43 66 6c |hop,...C| -q2 Cfl|
|00000140| 61 73 68 2e 63 0d 09 6c | 69 6e 6b 20 2d 73 6e 20 |ash.c..l|ink -sn |
|00000150| 4d 61 69 6e 3d 43 66 6c | 61 73 68 20 2d 73 6e 20 |Main=Cfl|ash -sn |
|00000160| 53 54 44 49 4f 3d 43 66 | 6c 61 73 68 20 b6 0d 09 |STDIO=Cf|lash ...|
|00000170| 09 20 2d 73 6e 20 49 4e | 54 45 4e 56 3d 43 66 6c |. -sn IN|TENV=Cfl|
|00000180| 61 73 68 20 2d 72 74 20 | 58 43 4d 44 3d 35 20 b6 |ash -rt |XCMD=5 .|
|00000190| 0d 09 09 20 43 66 6c 61 | 73 68 2e 63 2e 6f 20 2d |... Cfla|sh.c.o -|
|000001a0| 6f 20 48 79 70 65 72 43 | 6f 6d 6d 61 6e 64 73 20 |o HyperC|ommands |
|000001b0| 0d 09 09 20 0d 09 49 66 | 20 79 6f 75 72 20 70 72 |... ..If| your pr|
|000001c0| 6f 67 72 61 6d 20 75 73 | 65 72 20 70 61 72 74 73 |ogram us|er parts|
|000001d0| 20 6f 66 20 74 68 65 20 | 43 20 4c 69 62 72 61 72 | of the |C Librar|
|000001e0| 79 2c 20 75 73 65 20 74 | 68 69 73 20 6c 69 6e 6b |y, use t|his link|
|000001f0| 20 69 6e 73 74 65 61 64 | 3a 0d 09 0d 09 6c 69 6e | instead|:....lin|
|00000200| 6b 20 2d 73 6e 20 4d 61 | 69 6e 3d 43 66 6c 61 73 |k -sn Ma|in=Cflas|
|00000210| 68 20 2d 73 6e 20 53 54 | 44 49 4f 3d 43 66 6c 61 |h -sn ST|DIO=Cfla|
|00000220| 73 68 20 b6 0d 09 09 20 | 2d 73 6e 20 49 4e 54 45 |sh .... |-sn INTE|
|00000230| 4e 56 3d 43 66 6c 61 73 | 68 20 2d 72 74 20 58 43 |NV=Cflas|h -rt XC|
|00000240| 4d 44 3d 35 20 b6 0d 09 | 09 20 2d 6d 20 43 46 4c |MD=5 ...|. -m CFL|
|00000250| 41 53 48 20 43 66 6c 61 | 73 68 2e 63 2e 6f 20 22 |ASH Cfla|sh.c.o "|
|00000260| 7b 43 4c 69 62 72 61 72 | 69 65 73 7d 22 43 52 75 |{CLibrar|ies}"CRu|
|00000270| 6e 74 69 6d 65 2e 6f 20 | b6 0d 09 09 20 22 7b 43 |ntime.o |.... "{C|
|00000280| 4c 69 62 72 61 72 69 65 | 73 7d 22 43 49 6e 74 65 |Librarie|s}"CInte|
|00000290| 72 66 61 63 65 2e 6f 20 | b6 0d 09 09 20 2d 6f 20 |rface.o |.... -o |
|000002a0| 48 79 70 65 72 43 6f 6d | 6d 61 6e 64 73 0d 0d 09 |HyperCom|mands...|
|000002b0| 54 68 69 73 20 6c 69 6e | 6b 20 64 69 72 65 63 74 |This lin|k direct|
|000002c0| 69 76 65 20 70 75 74 73 | 20 74 68 65 20 58 43 4d |ive puts| the XCM|
|000002d0| 44 20 69 6e 20 74 68 65 | 20 66 69 6c 65 20 22 48 |D in the| file "H|
|000002e0| 79 70 65 72 43 6f 6d 6d | 61 6e 64 73 22 2e 0d 09 |yperComm|ands"...|
|000002f0| 53 75 62 73 74 69 74 75 | 74 65 20 74 68 65 20 6e |Substitu|te the n|
|00000300| 61 6d 65 20 6f 66 20 74 | 68 65 20 73 74 61 63 6b |ame of t|he stack|
|00000310| 20 79 6f 75 20 77 61 6e | 74 20 69 74 20 69 6e 2e | you wan|t it in.|
|00000320| 20 20 54 6f 20 6d 6f 76 | 65 20 58 43 4d 44 73 0d | To mov|e XCMDs.|
|00000330| 09 62 65 74 77 65 65 6e | 20 73 74 61 63 6b 73 2c |.between| stacks,|
|00000340| 20 75 73 65 20 52 65 73 | 45 64 69 74 2e 20 20 54 | use Res|Edit. T|
|00000350| 68 65 79 20 63 61 6e 20 | 62 65 20 69 6e 20 61 6e |hey can |be in an|
|00000360| 20 69 6e 64 69 76 69 64 | 75 61 6c 20 73 74 61 63 | individ|ual stac|
|00000370| 6b 2c 0d 09 74 68 65 20 | 48 6f 6d 65 20 73 74 61 |k,..the |Home sta|
|00000380| 63 6b 2c 20 74 68 65 20 | 48 79 70 65 72 43 61 72 |ck, the |HyperCar|
|00000390| 64 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 2c 20 6f |d applic|ation, o|
|000003a0| 72 20 74 68 65 20 53 79 | 73 74 65 6d 20 46 69 6c |r the Sy|stem Fil|
|000003b0| 65 2e 0d 09 0d 09 28 58 | 43 4d 44 3d 30 20 66 6f |e.....(X|CMD=0 fo|
|000003c0| 72 20 66 6c 61 73 68 20 | 66 72 6f 6d 20 50 61 73 |r flash |from Pas|
|000003d0| 63 61 6c 2c 20 3d 35 20 | 66 6f 72 20 63 46 6c 61 |cal, =5 |for cFla|
|000003e0| 73 68 20 66 72 6f 6d 20 | 43 29 0d 09 28 58 43 4d |sh from |C)..(XCM|
|000003f0| 44 3d 31 31 20 50 61 6e | 61 73 6f 6e 69 63 2c 20 |D=11 Pan|asonic, |
|00000400| 3d 31 32 20 48 69 74 61 | 63 68 69 2c 20 3d 31 33 |=12 Hita|chi, =13|
|00000410| 20 50 68 69 6c 6c 69 70 | 73 2c 20 3d 31 34 20 50 | Phillip|s, =14 P|
|00000420| 69 6f 6e 65 65 72 4c 44 | 56 36 30 30 30 2c 0d 09 |ioneerLD|V6000,..|
|00000430| 3d 31 35 20 50 69 6f 6e | 65 65 72 4c 56 50 34 32 |=15 Pion|eerLVP42|
|00000440| 30 30 2c 20 3d 32 30 20 | 53 6f 75 6e 64 43 61 70 |00, =20 |SoundCap|
|00000450| 54 6f 52 65 73 29 0d 2a | 2f 0d 0d 23 69 6e 63 6c |ToRes).*|/..#incl|
|00000460| 75 64 65 20 3c 54 79 70 | 65 73 2e 68 3e 0d 23 69 |ude <Typ|es.h>.#i|
|00000470| 6e 63 6c 75 64 65 20 3c | 4d 65 6d 6f 72 79 2e 68 |nclude <|Memory.h|
|00000480| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 4f 53 55 74 |>.#inclu|de <OSUt|
|00000490| 69 6c 73 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ils.h>.#|include |
|000004a0| 3c 51 75 69 63 6b 44 72 | 61 77 2e 68 3e 0d 23 69 |<QuickDr|aw.h>.#i|
|000004b0| 6e 63 6c 75 64 65 20 3c | 48 79 70 65 72 58 43 6d |nclude <|HyperXCm|
|000004c0| 64 2e 68 3e 0d 70 61 73 | 63 61 6c 09 76 6f 69 64 |d.h>.pas|cal.void|
|000004d0| 09 44 65 62 75 67 67 65 | 72 28 29 09 65 78 74 65 |.Debugge|r().exte|
|000004e0| 72 6e 20 30 78 41 39 46 | 46 3b 20 20 20 0d 0d 2f |rn 0xA9F|F; ../|
|000004f0| 2a 20 2a 2a 2a 2a 20 57 | 41 52 4e 49 4e 47 3a 20 |* **** W|ARNING: |
|00000500| 20 44 4f 20 4e 4f 54 20 | 55 53 45 20 47 4c 4f 42 | DO NOT |USE GLOB|
|00000510| 41 4c 20 56 41 52 49 41 | 42 4c 45 53 21 20 2a 2a |AL VARIA|BLES! **|
|00000520| 2a 2a 20 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 76 6f |** */..p|ascal vo|
|00000530| 69 64 20 43 46 6c 61 73 | 68 28 70 61 72 61 6d 50 |id CFlas|h(paramP|
|00000540| 74 72 29 0d 09 58 43 6d | 64 42 6c 6f 63 6b 50 74 |tr)..XCm|dBlockPt|
|00000550| 72 09 70 61 72 61 6d 50 | 74 72 3b 0d 7b 0d 09 73 |r.paramP|tr;.{..s|
|00000560| 68 6f 72 74 09 66 6c 61 | 73 68 43 6f 75 6e 74 2c |hort.fla|shCount,|
|00000570| 61 67 61 69 6e 3b 0d 09 | 47 72 61 66 50 74 72 09 |again;..|GrafPtr.|
|00000580| 70 6f 72 74 3b 0d 09 53 | 74 72 32 35 35 09 73 74 |port;..S|tr255.st|
|00000590| 72 3b 0d 0d 09 2f 2a 20 | 46 69 72 73 74 20 70 61 |r;.../* |First pa|
|000005a0| 72 61 6d 20 69 73 20 66 | 6c 61 73 68 20 63 6f 75 |ram is f|lash cou|
|000005b0| 6e 74 2e 20 20 43 6f 6e | 76 65 72 74 20 69 74 20 |nt. Con|vert it |
|000005c0| 74 6f 20 61 20 70 61 73 | 63 61 6c 20 73 74 72 69 |to a pas|cal stri|
|000005d0| 6e 67 20 2a 2f 0d 09 5a | 65 72 6f 54 6f 50 61 73 |ng */..Z|eroToPas|
|000005e0| 28 70 61 72 61 6d 50 74 | 72 2c 2a 28 70 61 72 61 |(paramPt|r,*(para|
|000005f0| 6d 50 74 72 2d 3e 70 61 | 72 61 6d 73 5b 30 5d 29 |mPtr->pa|rams[0])|
|00000600| 2c 26 73 74 72 29 3b 0d | 09 2f 2a 20 43 6f 6e 76 |,&str);.|./* Conv|
|00000610| 65 72 74 20 74 68 65 20 | 73 74 72 69 6e 67 20 74 |ert the |string t|
|00000620| 6f 20 61 20 6e 75 6d 62 | 65 72 20 2a 2f 0d 09 66 |o a numb|er */..f|
|00000630| 6c 61 73 68 43 6f 75 6e | 74 20 3d 20 53 74 72 54 |lashCoun|t = StrT|
|00000640| 6f 4e 75 6d 28 70 61 72 | 61 6d 50 74 72 2c 26 73 |oNum(par|amPtr,&s|
|00000650| 74 72 29 3b 0d 09 47 65 | 74 50 6f 72 74 28 26 70 |tr);..Ge|tPort(&p|
|00000660| 6f 72 74 29 3b 0d 09 66 | 6f 72 20 28 61 67 61 69 |ort);..f|or (agai|
|00000670| 6e 20 3d 20 31 3b 20 61 | 67 61 69 6e 20 3c 3d 20 |n = 1; a|gain <= |
|00000680| 66 6c 61 73 68 43 6f 75 | 6e 74 3b 20 61 67 61 69 |flashCou|nt; agai|
|00000690| 6e 2b 2b 29 0d 09 20 20 | 20 20 7b 0d 09 09 09 49 |n++).. | {....I|
|000006a0| 6e 76 65 72 74 52 65 63 | 74 28 26 70 6f 72 74 2d |nvertRec|t(&port-|
|000006b0| 3e 70 6f 72 74 52 65 63 | 74 29 3b 0d 09 09 09 49 |>portRec|t);....I|
|000006c0| 6e 76 65 72 74 52 65 63 | 74 28 26 70 6f 72 74 2d |nvertRec|t(&port-|
|000006d0| 3e 70 6f 72 74 52 65 63 | 74 29 3b 0d 09 09 7d 0d |>portRec|t);...}.|
|000006e0| 7d 0d 0d 2f 2a 20 43 20 | 72 6f 75 74 69 6e 65 73 |}../* C |routines|
|000006f0| 20 66 6f 72 20 48 79 70 | 65 72 43 61 72 64 20 63 | for Hyp|erCard c|
|00000700| 61 6c 6c 62 61 63 6b 73 | 20 2a 2f 0d 23 69 6e 63 |allbacks| */.#inc|
|00000710| 6c 75 64 65 20 3c 58 43 | 6d 64 47 6c 75 65 2e 69 |lude <XC|mdGlue.i|
|00000720| 6e 63 2e 63 3e 0d 0d 0d | 00 00 00 00 00 00 00 00 |nc.c>...|........|
|00000730| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000740| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000760| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000780| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000790| 3b 0d 09 20 57 48 49 4c | 45 20 63 6f 6d 6d 61 6e |;.. WHIL|E comman|
|000007a0| 64 50 74 72 5e 20 3c 3e | 20 30 20 44 4f 0d 09 20 |dPtr^ <>| 0 DO.. |
|000007b0| 1a 31 2e 20 44 44 45 78 | 70 61 6e 64 45 78 70 61 |.1. DDEx|pandExpa|
|000007c0| 6e 64 54 65 6d 70 46 69 | 6c 65 20 78 02 00 00 00 |ndTempFi|le x....|
|000007d0| 00 00 44 44 54 4d 44 44 | 41 50 01 00 00 00 00 00 |..DDTMDD|AP......|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000007f0| 00 00 a5 f3 e9 0e 00 00 | 06 a8 00 00 01 7e 6e 75 |........|.....~nu|
|00000800| 6d 62 65 72 20 2b 20 4f | 52 44 28 63 68 29 20 2d |mber + O|RD(ch) -|
|00000810| 20 4f 52 44 28 27 30 27 | 29 3b 0d 09 09 20 63 6f | ORD('0'|);... co|
|00000820| 6d 6d 61 6e 64 50 74 72 | 20 3a 3d 20 50 6f 69 6e |mmandPtr| := Poin|
|00000830| 74 65 72 28 4f 52 44 28 | 63 6f 6d 6d 61 6e 64 50 |ter(ORD(|commandP|
|00000840| 74 72 29 20 2b 20 31 29 | 3b 0d 09 20 20 20 45 4e |tr) + 1)|;.. EN|
|00000850| 44 3b 0d 09 20 49 46 20 | 6e 75 6d 62 65 72 20 3d |D;.. IF |number =|
|00000860| 20 30 20 54 48 45 4e 20 | 6e 75 6d 62 65 72 20 3a | 0 THEN |number :|
|00000870| 3d 20 31 3b 20 20 20 7b | 20 64 65 66 61 75 6c 74 |= 1; {| default|
|00000880| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 09 54 6f |...H..Mo|naco..To|
|00000890| 20 63 6f 6d 70 69 6c 65 | 20 61 6e 64 20 6c 69 6e | compile| and lin|
|000008a0| 6b 20 74 68 69 73 00 06 | 00 04 00 3c 00 24 01 53 |k this..|...<.$.S|
|000008b0| 01 fd 00 3c 00 24 01 53 | 01 fd 9d 37 be ca 00 00 |...<.$.S|...7....|
|000008c0| 06 8c 00 00 06 8c 00 00 | 05 06 01 00 00 00 01 00 |........|........|
|000008d0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 01 98 5e |...L...L|...2...^|
|000008e0| 05 e2 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|000008f0| 00 0a 03 ed ff ff 00 00 | 00 00 00 02 a4 1e 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+